package com.wavecoler.gui.servlets;
import java.util.logging.Logger;

import java.io.IOException;

import javax.servlet.*;
import javax.servlet.http.*;

import com.wavecoler.objects.Communication;

@SuppressWarnings("serial")
public class ColerAppEngineServlet extends HttpServlet {
	 private static final Logger log = Logger.getLogger(ColerAppEngineServlet.class.getName());

	
	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws IOException {
	   /*      try {	 
	        	RequestDispatcher dispatcher = getServletContext().getRequestDispatcher("/individual.html");
				dispatcher.forward(request, response);
			} catch (ServletException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}  */
		      Communication.setHasPrivilege(true);
		   
		      response.setContentType("text/plain");
		      response.getWriter().println("Hello, world");
		      response.getWriter().println("HasPrivilege: "+ Communication.getHasPrivilege());
		      response.sendRedirect("/indiv.html");
	}
}
